<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @property int $id
 * @property int $pid
 * @property string $createtime
 * @property string $name 名称
 * @property-read \app\model\ActivityClass $class
 * @property-read \app\model\ActivityClass[] $class_id
 * @mixin \think\Model
 */
class ActivityClass extends Model
{
    protected $createTime = 'createtime';

    function classId()
    {
        return $this->hasMany(ActivityClass::class,'pid');
    }

    function class()
    {
        return $this->belongsTo(ActivityClass::class,'pid');
    }
}
